﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="hrHireCheck.aspx.cs" Inherits="ZX.WebApp.EHR.hrHireCheck" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript">
        //获取url里的参数值 name:参数名称
        function getPar(source, name) {
            var reg = new RegExp("(^|\\?|&)" + name + "=([^&]*)(\\s|&|$)", "i");
            if (reg.test(source))
                return RegExp.$2;
            return "";
        };
        function getPar1(name) {
            var _url = "http://" + document.location;
            return getPar(_url, name);
        }
        function Save() {
            //预录用审核
            var id = getPar1("id");
            if (id == "") return;
            var interviewStatus = $("#hireCheck").val();
            if (interviewStatus != "") {
                YAHOO.util.Connect.asyncRequest('POST', "../../EHR/hrAjax.aspx?flag=modifyinterviewstatus&status=" + interviewStatus + "&id=" + id, {
                    success: function (res) {
                        try {
                            var str = res.responseText;
                            if (str == 0) {
                                alert("数据保存成功");
                                if (typeof (parent.ReLoadData) == "function") {
                                    parent.const_Condition = "InterviewStatus>4";
                                    parent.ReLoadData();
                                    parent.closeWin();
                                }
                            }
                            else {
                                alert("数据保存失败！");
                            }
                        }
                        catch (e) { }
                        finally { }
                    },
                    failure: function (error) {
                        alert("数据错误：" + error.statusText);
                    }
                }, null);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <br />
    <table style="font-family: 宋体, Arial, Helvetica, sans-serif; font-size: small">
      <tr>
        <td>&nbsp;&nbsp;</td>
        <td>
          审核结果：<select id="hireCheck" style="width:160px" ><option selected="selected" value="6">审核通过</option><option value="7">审核不通过</option></select>
        </td>
      </tr>
      </table>
    </div>
    </form>
</body>
</html>
